Crate devela

source ·
Expand description

Development extensions for the Rust Standard Library.

Features

  • std (default): enables functionality that depends on the standard library. Disabling it makes the crate no_std compatible.
  • alloc: enables functionality that depends on allocation. Included in std.
  • no-std: enables functionality incompatible with std (unused).

  • safe: forbids all unsafe code at the crate level.
  • unsafe: meta feature enabling every modular unsafe feature:
    • unsafe_cmp: enables const floating-point comparison in cmp, using transmute for constant access to the bits.
    • unsafe_convert: enables using MaybeUninit for array initialization in slice_into_array.
    • unsafe_fmt: provides IntBuf and IntBufable in fmt. Unsafe blocks are ported verbatim from itoa.
    • unsafe_num: enables new_unchecked and implements bytemuck traits for new types defined in num.

  • bytemuck: implements several unsafe bytemuck traits for num types.

Modules

Macros

  • Salloc
    Brief String constructor.
  • ccompact dbg!. Uses {:?} instead of {:#?} for formatting.
  • Returns a formatted string slice backed by a buffer, no_std compatible.
  • indented format.
  • inline if.
  • Alias of Path::new(concat![env!("CARGO_MANIFEST_DIR"), $path]).
  • Allows to paste identifiers together (reexported from the paste crate).
  • rust format skip macro.